package com.tanhua.server.interceptor;

import com.tanhua.model.db.User;

/**
 * @ClassName :  UserThreadLocal
 * @Author : Tenebrous
 * @Date: 2020/12/12 21:30
 * @Description : 统一token拦截器
 */
public class UserThreadLocal {

    private static final ThreadLocal<User> LOCAL = new ThreadLocal<>();

    private UserThreadLocal() {

    }

    public static void set(User user) {
        LOCAL.set(user);
    }

    public static User get() {
        return LOCAL.get();
    }

}